-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix-colorpicker(Added a color picker for tiles) #1787
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codacy is wrong this code looks fine
can someone please merge this PR after reviewing |
import KeyboardArrowRightIcon from '@material-ui/icons/KeyboardArrowRight'; | ||
import KeyboardArrowLeftIcon from '@material-ui/icons/KeyboardArrowLeft'; | ||
import Select from '@material-ui/core/Select'; | ||
import MenuItem from '@material-ui/core/MenuItem'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you undo the changes to the indentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see there is no intendation in line 15 to 18 in the main repo
}; | ||
|
||
handleChangeComplete = color => { | ||
const colorhex = color.hex ? color.hex : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this safe?
We check whether color
is truthy on line 414; I assume it's possible for it to be undefined so we could get a TypeError here. Perhaps we could move this inside the if statement or use optional chaining?
const colorhex = color.hex ? color.hex : ''; | |
const colorhex = color?.hex || ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure , will make this change
Hi , I have solved the issue please do review and ping me up for any further issues , thanks !